#!/bin/bash

yum install -y nc
#nc -lk 9000

yum install -y git

#git --version

dockerPath=/opt/docker
flinkPath=$dockerPath/flink
flinkGitPath=$flinkPath/git
mkdir -p $flinkGitPath

mkdir -p /tmp/flink-checkpoints-directory
mkdir -p /tmp/flink-savepoints-directory

git clone https://gitee.com/yuninglong/flink-playgrounds $flinkGitPath

cd $flinkGitPath/operations-playground

docker-compose build

docker-compose up -d

#docker-compose ps

#修改内存配置
#vim /opt/docker/flink/git/operations-playground/conf/flink-conf.yaml

#jobmanager.memory.process.size: 4096Mb
#jobmanager.rpc.address: jobmanager
#blob.server.port: 6124
#query.server.port: 6125
#
#taskmanager.memory.process.size: 1728Mb
#taskmanager.numberOfTaskSlots: 1
###taskmanager.memory.flink.size: 1280Mb
#
#state.backend: filesystem
#state.checkpoints.dir: file:///tmp/flink-checkpoints-directory
#state.savepoints.dir: file:///tmp/flink-savepoints-directory
#
#heartbeat.interval: 1000
#heartbeat.timeout: 5000
#
#rest.flamegraph.enabled: true
#web.backpressure.refresh-interval: 10000
